package com.wx.servicebase.rabbitMq.receiver;



import com.wx.commonutils.MailUtil;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class ReceiveListener {

    /*监听哪个队列*/
    @RabbitListener(queues = "registQueue")
    public void receive(String registInfo){

        /*向邮箱发送信息*/
        MailUtil.sendMail("注册成功","1378763816@qq.com",registInfo);


    }
}
